//
//  EKEvent+Extension.m
//  YSUtils
//
//  Created by edz on 2021/4/11.
//  Copyright © 2021 Apple. All rights reserved.
//

#import "EKEvent+Extension.h"

@implementation EKEvent (Extension)
- (EKEvent * _Nonnull (^)(NSString * _Nonnull))ys_title {
    return  ^EKEvent *(NSString * title) {
        self.title = title;
        return self;
    };
}

- (EKEvent * _Nonnull (^)(NSString * _Nonnull))ys_location {
    return ^EKEvent *(NSString * location) {
        self.location = location;
        return self;
    };
}

- (EKEvent * _Nonnull (^)(NSString * _Nonnull))ys_notes {
    return ^EKEvent *(NSString * notes) {
        self.notes = notes;
        return self;
    };
}

- (EKEvent * _Nonnull (^)(NSDate * _Nonnull))ys_startDate {
    return ^EKEvent *(NSDate *startDate) {
        self.startDate = startDate;
        return self;
    };
}

- (EKEvent * _Nonnull (^)(NSDate * _Nonnull))ys_endDate {
    return ^EKEvent *(NSDate * endDate) {
        self.endDate = endDate;
        return self;
    };
}

- (EKEvent * _Nonnull (^)(EKAlarm * _Nonnull))ys_addAlarm {
    return ^EKEvent *(EKAlarm *alarm) {
        [self addAlarm:alarm];
        return self;
    };
}

- (EKEvent * _Nonnull (^)(NSTimeZone * _Nonnull))ys_timeZone {
    return ^EKEvent *(NSTimeZone *timeZone) {
        self.timeZone = timeZone;
        return self;
    };
}

- (EKEvent * _Nonnull (^)(EKCalendar * _Nonnull))ys_calendar {
    return ^EKEvent *(EKCalendar *calendar) {
        self.calendar = calendar;
        return self;
    };
}

- (EKEvent * _Nonnull (^)(NSURL * _Nonnull))ys_URL {
    return ^EKEvent *(NSURL *URL){
        self.URL = URL;
        return self;
    };
}

@end
